package xiaohongshu

import (
	"github.com/gin-gonic/gin"
	"marketing-server/middleware"
)

type XhsTicketRouter struct{}

// InitXhsTicketRouter 初始化 xhsTicket表 路由信息
func (s *XhsTicketRouter) InitXhsTicketRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	xhsTicketRouter := Router.Group("xhsTicket").Use(middleware.OperationRecord())
	xhsTicketRouterWithoutRecord := Router.Group("xhsTicket")
	xhsTicketRouterWithoutAuth := PublicRouter.Group("xhsTicket")
	{
		xhsTicketRouter.POST("createXhsTicket", xhsTicketApi.CreateXhsTicket)             // 新建xhsTicket表
		xhsTicketRouter.DELETE("deleteXhsTicket", xhsTicketApi.DeleteXhsTicket)           // 删除xhsTicket表
		xhsTicketRouter.DELETE("deleteXhsTicketByIds", xhsTicketApi.DeleteXhsTicketByIds) // 批量删除xhsTicket表
		xhsTicketRouter.PUT("updateXhsTicket", xhsTicketApi.UpdateXhsTicket)              // 更新xhsTicket表
	}
	{
		xhsTicketRouterWithoutRecord.GET("findXhsTicket", xhsTicketApi.FindXhsTicket)       // 根据ID获取xhsTicket表
		xhsTicketRouterWithoutRecord.GET("getXhsTicketList", xhsTicketApi.GetXhsTicketList) // 获取xhsTicket表列表
	}
	{
		xhsTicketRouterWithoutAuth.GET("getXhsTicketPublic", xhsTicketApi.GetXhsTicketPublic) // xhsTicket表开放接口
	}
}
